package appapi.service.impl;

import appapi.Request.ApiReq.EquipApiReq;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import appapi.entity.Zhongjiao.GantrycraneWorkDataEntity;
import appapi.dao.GantrycraneWorkDataMapper;
import appapi.service.GantrycraneWorkDataService;

import java.util.List;

/**
 * @version: java version 1.8
 * @Author: Ygp Work
 * @description:
 * @date: 2023-08-10 15:57
 */

@Service
public class GantrycraneWorkDataServiceImpl implements GantrycraneWorkDataService{

    @Resource
    private GantrycraneWorkDataMapper gantrycraneWorkDataMapper;

    @Override
    public int deleteByPrimaryKey(Integer id) {
        return gantrycraneWorkDataMapper.deleteByPrimaryKey(id);
    }

    @Override
    public int insert(GantrycraneWorkDataEntity record) {
        return gantrycraneWorkDataMapper.insert(record);
    }

    @Override
    public int insertSelective(GantrycraneWorkDataEntity record) {
        return gantrycraneWorkDataMapper.insertSelective(record);
    }

    @Override
    public GantrycraneWorkDataEntity selectByPrimaryKey(Integer id) {
        return gantrycraneWorkDataMapper.selectByPrimaryKey(id);
    }

    @Override
    public int updateByPrimaryKeySelective(GantrycraneWorkDataEntity record) {
        return gantrycraneWorkDataMapper.updateByPrimaryKeySelective(record);
    }

    @Override
    public int updateByPrimaryKey(GantrycraneWorkDataEntity record) {
        return gantrycraneWorkDataMapper.updateByPrimaryKey(record);
    }

     @Override
     public PageInfo<GantrycraneWorkDataEntity> selectPage(EquipApiReq req) {
         PageHelper.startPage(req.getCurrentPage(),req.getPageSize());
         List<GantrycraneWorkDataEntity> list = gantrycraneWorkDataMapper.selectall();
         return new PageInfo<>(list,req.getPageSize());
     }

 }
